using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._3DAnalystTools._3DFeatures._Extraction
{
    /// <summary>
    /// <para>LAS Building Multipatch</para>
    /// <para>Creates building models derived from rooftop points captured in lidar data.</para>
    /// <para>创建从激光雷达数据中捕获的屋顶点派生的建筑模型。</para>
    /// </summary>    
    [DisplayName("LAS Building Multipatch")]
    public class LasBuildingMultipatch : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public LasBuildingMultipatch()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_las_dataset">
        /// <para>Input LAS Dataset</para>
        /// <para>The LAS dataset whose points define the building rooftop.</para>
        /// <para>其点定义建筑物屋顶的 LAS 数据集。</para>
        /// </param>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The polygon features that define the building footprint.</para>
        /// <para>用于定义建筑物覆盖区的面要素。</para>
        /// </param>
        /// <param name="_ground">
        /// <para>Ground Height</para>
        /// <para>The source of ground height values can be either a numeric field in the building footprint attribute table, or a raster or TIN surface. A field-based ground source will be processed faster than a surface-based ground source.</para>
        /// <para>地面高度值的来源可以是建筑物覆盖区属性表中的数值字段，也可以是栅格或 TIN 表面。基于现场的地面源的处理速度将比基于地面的地面源更快。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Multipatch Feature Class</para>
        /// <para>The multipatch feature class that will store the output building models.</para>
        /// <para>将存储输出建筑模型的多面体要素类。</para>
        /// </param>
        public LasBuildingMultipatch(object _in_las_dataset, object _in_features, object _ground, object _out_feature_class)
        {
            this._in_las_dataset = _in_las_dataset;
            this._in_features = _in_features;
            this._ground = _ground;
            this._out_feature_class = _out_feature_class;
        }
        public override string ToolboxName => "3D Analyst Tools";

        public override string ToolName => "LAS Building Multipatch";

        public override string CallName => "3d.LasBuildingMultipatch";

        public override List<string> AcceptEnvironments => ["XYDomain", "XYResolution", "XYTolerance", "ZDomain", "ZResolution", "ZTolerance", "extent", "geographicTransformations", "outputCoordinateSystem", "scratchWorkspace"];

        public override object[] ParameterInfo => [_in_las_dataset, _in_features, _ground, _out_feature_class, _point_selection.GetGPValue(), _simplification];

        /// <summary>
        /// <para>Input LAS Dataset</para>
        /// <para>The LAS dataset whose points define the building rooftop.</para>
        /// <para>其点定义建筑物屋顶的 LAS 数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input LAS Dataset")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_las_dataset { get; set; }


        /// <summary>
        /// <para>Input Features</para>
        /// <para>The polygon features that define the building footprint.</para>
        /// <para>用于定义建筑物覆盖区的面要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Ground Height</para>
        /// <para>The source of ground height values can be either a numeric field in the building footprint attribute table, or a raster or TIN surface. A field-based ground source will be processed faster than a surface-based ground source.</para>
        /// <para>地面高度值的来源可以是建筑物覆盖区属性表中的数值字段，也可以是栅格或 TIN 表面。基于现场的地面源的处理速度将比基于地面的地面源更快。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Ground Height")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _ground { get; set; }


        /// <summary>
        /// <para>Output Multipatch Feature Class</para>
        /// <para>The multipatch feature class that will store the output building models.</para>
        /// <para>将存储输出建筑模型的多面体要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Multipatch Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>LAS Rooftop Point Selection</para>
        /// <para><xdoc>
        ///   <para>The LAS points that will be used to define the building rooftop.</para>
        ///   <bulletList>
        ///     <bullet_item>Building Classified Points—LAS points assigned with a class code value of 6. This is the default.</bullet_item><para/>
        ///     <bullet_item>Layer Filtered Points—LAS points that are filtered by the input layer.</bullet_item><para/>
        ///     <bullet_item>All Points—All LAS points that overlay the building footprint.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将用于定义建筑物屋顶的 LAS 点。</para>
        ///   <bulletList>
        ///     <bullet_item>构建分类点 - 分配的类代码值为 6 的 LAS 点。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>图层过滤点 - 按输入图层过滤的 LAS 点。</bullet_item><para/>
        ///     <bullet_item>所有点 - 覆盖建筑物覆盖区的所有 LAS 点。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("LAS Rooftop Point Selection")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _point_selection_value _point_selection { get; set; } = _point_selection_value._BUILDING_CLASSIFIED_POINTS;

        public enum _point_selection_value
        {
            /// <summary>
            /// <para>Building Classified Points</para>
            /// <para>Building Classified Points—LAS points assigned with a class code value of 6. This is the default.</para>
            /// <para>构建分类点 - 分配的类代码值为 6 的 LAS 点。这是默认设置。</para>
            /// </summary>
            [Description("Building Classified Points")]
            [GPEnumValue("BUILDING_CLASSIFIED_POINTS")]
            _BUILDING_CLASSIFIED_POINTS,

            /// <summary>
            /// <para>Layer Filtered Points</para>
            /// <para>Layer Filtered Points—LAS points that are filtered by the input layer.</para>
            /// <para>图层过滤点 - 按输入图层过滤的 LAS 点。</para>
            /// </summary>
            [Description("Layer Filtered Points")]
            [GPEnumValue("LAYER_FILTERED_POINTS")]
            _LAYER_FILTERED_POINTS,

            /// <summary>
            /// <para>All Points</para>
            /// <para>All Points—All LAS points that overlay the building footprint.</para>
            /// <para>所有点 - 覆盖建筑物覆盖区的所有 LAS 点。</para>
            /// </summary>
            [Description("All Points")]
            [GPEnumValue("ALL_POINTS")]
            _ALL_POINTS,

        }

        /// <summary>
        /// <para>Simplification Tolerance</para>
        /// <para>The z-tolerance value that will be used to reduce the number of LAS points factored into modeling the building rooftop. This value defines the maximum threshold of deviation between the output rooftop model and the rooftop surface created from the full resolution of LAS points.</para>
        /// <para>将用于减少建筑物屋顶建模中考虑的 LAS 点数的 z 容差值。此值定义输出屋顶模型与根据 LAS 点的全分辨率创建的屋顶表面之间的最大偏差阈值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Simplification Tolerance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _simplification { get; set; } = null;


        public LasBuildingMultipatch SetEnv(object XYDomain = null, object XYResolution = null, object XYTolerance = null, object ZDomain = null, object ZResolution = null, object ZTolerance = null, object extent = null, object geographicTransformations = null, object outputCoordinateSystem = null, object scratchWorkspace = null)
        {
            base.SetEnv(XYDomain: XYDomain, XYResolution: XYResolution, XYTolerance: XYTolerance, ZDomain: ZDomain, ZResolution: ZResolution, ZTolerance: ZTolerance, extent: extent, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, scratchWorkspace: scratchWorkspace);
            return this;
        }

    }

}